package org.example.userToContentEnum;

/**
 * @FileName AuditEnum
 * @Description
 * @Author coderfun
 * @selfDesc coding in fun
 * @date 2024-11-27
 **/
public enum AuditEnum {
    PENDING_AUDIT(0),          // 待审核
    NORMAL_DISPLAY(1),         // 正常显示
    DELETED(2),                // 被删除
    TAKEDOWN(3);               // 被下架

    private final int value;

    AuditEnum(int value) {
        this.value = value;
    }

    public long getValue() {
        return value;
    }

    public static AuditEnum fromValue(int value) {
        for (AuditEnum auditEnum : values()) {
            if (auditEnum.getValue() == value) {
                return auditEnum;
            }
        }
        throw new IllegalArgumentException("Invalid auditEnum value: " + value);
    }
}
